package com.chen.blue.utils;

import cn.hutool.http.HttpStatus;
import com.chen.blue.result.TableDataInfo;
import com.github.pagehelper.PageInfo;


import java.util.List;

/**
 * Created By CLT On 2023/10/9.
 */
@SuppressWarnings("all")
public class TableDateUtil {

    public static TableDataInfo getDataTable(List<?> list) {
        TableDataInfo rspData = new TableDataInfo();
        rspData.setCode(HttpStatus.HTTP_OK);
        rspData.setMsg("查询成功");
        rspData.setRows(list);
        rspData.setTotal(new PageInfo(list).getTotal());
        return rspData;
    }

}
